<template>
  <ul class="item-container clearfix">
    <li v-for="(temp, index) in floorData" :key="'miva' + index" class="item-box">
      <div class="icon-box">
        <i :class="temp.icon"></i>
      </div>
      <div class="title">{{temp.title}}</div>
    </li>
  </ul>
</template>

<script>
import data from "@/data/index.json";

export default {
  props: {
    floorData: {
      type: Array,
      default() {
        return data.floor4Data;
      }
    }
  }
};
</script>

<style lang="less" scoped>
.item-container {
  padding-bottom: 30px;
}
.item-box {
  float: left;
  width: 100%/6;
  text-align: center;
  position: relative;
  transition-delay: 0.1s;
  transition: all 0.5s;
  .icon-box {
    width: 70%;
    height: 0;
    padding-bottom: 70%;
    border: 1px solid #007eff;
    border-radius: 50%;
    margin: auto;
    .iconfont {
      font-size: 60px;
    }
  }
  &:hover {
    color: #fff;
    animation: mivaZoom 0.5s;
    .icon-box {
      border-color: #333;
      background: #333;
    }
  }
  .title {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%);
  }
}

@media (max-width: 768px) {
  .item-box {
    width: 100%/2;
    margin: 10% 0;
  }
}

@keyframes mivaZoom {
  0% {
    transform: scale(0.9);
  }
  80% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
</style>
